package com.smh.a06regexDemo6;

public class RegexDemo2 {
    public static void main(String[] args) {

        String s = "史铭辉asdasdad白信哲asdasdads王奕辰";

        String regex = "[\\w&&[^_]]+";
        //替换
        System.out.println(s.replaceAll(regex, "vs"));
        //切割
        String[] arr = s.split(regex);
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }

    }
}
